package cn.tedu.bonfire.front.payment.schedule;

import cn.tedu.bonfire.front.payment.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ExpirationSchedule {
    @Autowired
    private IUserService userService;

    // 每日凌晨2:30执行
    @Scheduled(cron = "0 30 2 * * ?")
    public void updateExpiration(){
        userService.updateExpiration();
    }
}
